﻿/* ============================================================================== 
 * 功能描述：IState 
 * 创 建 者：Administrator
 * 创建日期：2016/4/26 13:04:02 
 * ==============================================================================*/

using System;
using System.Collections.Generic;
using UnityEngine;

public interface IState
{
    /// <summary>
    /// 获取状态Id
    /// </summary>
    int GetStateId();

    /// <summary>
    /// 进入状态
    /// </summary>
    /// <param name="machine">状态机</param>
    /// <param name="oldState">旧状态</param>
    /// <param name="param"></param>
    void OnEnter(StateMachine machine,IState oldState,params object[] param);

    /// <summary>
    /// 在状态中
    /// </summary>
    void OnUse();

    /// <summary>
    /// 离开状态
    /// </summary>
    /// <param name="newState">下一个状态</param>
    /// <param name="param"></param>
    void OnLeave(IState newState,params object[] param);
}
